package com.whimscrew.user.service;

import com.whimscrew.user.config.FeignConfig;
import com.whimscrew.user.model.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

//对应Eureka注册的部门服务名称
@FeignClient(value = "dept",configuration = {FeignConfig.class})
public interface DeptService {


    @GetMapping("/v1/dept")
    String getDept();

    @PostMapping("/v1/dept")
    Dept saveDept(@RequestParam("userName") String userName);

    @GetMapping("/v2/dept")
    String getV2Dept();
}
